#include<stdio.h>
#include<stdlib.h>


int g_val_1;
int g_val_2 = 100;

int main()
{
    printf("code addr: %p\n",main);//代码区
    const char *str ="hello Linux";
    printf("read only string addr: %p\n",str);//静态区
    printf("init global value addr: %p\n",&g_val_2);//已初始化变量
    printf("uninit glboal value  addr: %p\n",&g_val_1);//未初始化变量
    char *mem = (char*)malloc(100);
    printf("heap addr: %p\n",mem);//对区地址
    printf("stack addr: %p\n",&str);
    return 0;
}
